package so.wy.servicecenter.businessbed.dao.enums;

/**
 * 支付相对平台类型
 */
public enum TypePushEnum {
    MINIO_SUBMSG(1, "小程序订阅消息");

    private Integer code;
    private String name;

    TypePushEnum(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public Integer getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static TypePushEnum codeOf(Integer code) {
        if (code == null) {
            return null;
        }

        TypePushEnum[] values = values();
        for (TypePushEnum value : values) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }

    public static String codeOfDesc(Integer code) {
        TypePushEnum value = codeOf(code);

        return value == null ? "" : value.getName();
    }
}